package com.aiit.dao;

import com.aiit.pojo.ADoctor;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ADoctorDao {
    //查询所有医生
    @Select("select * from adoctor")
    List<ADoctor> queryList();

    //根据类别查询
    List<ADoctor> queryByKind(@Param("kind") String kind);

    //根据id查询
    ADoctor queryById(Integer id);

    //查询指定行数据
    List<ADoctor> queryAllByLimit(@Param("offset") int offset, @Param("limit") int limit);

    //通过实体作为筛选条件查询
    List<ADoctor> queryAll(ADoctor doctor);

    //增加
    int insert(ADoctor doctor);

    //修改
    int update(ADoctor doctor);

    //删除
    int deleteById(Integer id);

}
